package com.yuyou.tas.service.api.lesson.service;

import com.yuyou.tas.service.api.lesson.entity.*;
import com.yuyou.tas.service.api.lesson.vo.LessonClassVo;
import com.yuyou.tas.util.bean.ResBoolSimpleInfo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


@FeignClient(value = "tas-lesson-service")
@RequestMapping(value = "/baseDataAPI")
public interface BaseDataAPI {
	
	@RequestMapping(value = "/copyBaseService",method = RequestMethod.POST)
	boolean copyBaseService(@RequestParam(value = "userID") Long userID ,@RequestParam(value = "userOrganId") Long userOrganId , @RequestParam(value = "organId")Long organId);
	
	@RequestMapping(value = "/syncSchool",method = RequestMethod.POST)
	ResBoolSimpleInfo<String> syncSchool(@RequestBody List<BaseSchool> baseSchool );
	
	@RequestMapping(value = "/delSchoolByOrgan7OIds")
	ResBoolSimpleInfo<String> delSchoolByOrgan7OIds(@RequestParam("oIds") List<Long> oIds,@RequestParam("authOrganizationId") Long authOrganizationId)
			throws Exception;
	
	@RequestMapping(value = "/syncTrimester",method = RequestMethod.POST)
	ResBoolSimpleInfo<String> syncTrimester(@RequestBody List<BaseTrimester> list );

	@RequestMapping(value = "/delTrimesterByOrgan7OIds")
	ResBoolSimpleInfo<String> delTrimesterByOrgan7OIds(@RequestParam("oIds") List<Long> oIds,@RequestParam("authOrganizationId") Long authOrganizationId)
			throws Exception;


	@RequestMapping(value = "/selectBaseSectionById",method = RequestMethod.POST)
	BaseSection selectBaseSectionById(@RequestParam(value = "id") Long id);

	@RequestMapping(value = "/findBaseSectionByIds",method = RequestMethod.POST)
	List<BaseSection> findBaseSectionByIds(@RequestParam(value = "ids") List<Long> ids);

	@RequestMapping(value = "/findSectionName", method = RequestMethod.POST)
	List<BaseSection> findSectionName(Map<String, Object> condition);
	
	/**
	 * 找出所有年级
	 * @return
	 */
	@RequestMapping(value = "/findBaseSection", method = RequestMethod.POST)
	List<BaseSection> findBaseSection();
	
    /**
     * 根据机构主键查找所有学期
     * @param authOrganizationId
     * @return
     */
	@RequestMapping(value = "/findTrimByOran", method = RequestMethod.POST)
	List<BaseTrimester> findTrimByOran(@RequestParam("authOrganizationId") Long authOrganizationId);

	/**
	 * 根据机构主键查找所有校区
	 * @param organId
	 * @return
	 */
	@RequestMapping(value = "/getByOrganId", method = RequestMethod.POST)
	List<BaseSchool> getSchoolByOrganId(@RequestParam("organId")Long organId);

	/**
	 * 根据机构主键查找所有班级
	 * @param organId
	 * @return
	 */
	@RequestMapping(value = "/findLessonClassByOrganId", method = RequestMethod.POST)
	List<LessonClassVo> findLessonClassByOrganId(@RequestParam("organId")Long organId);

	/**
	 * 根据机构主键查找所有学生
	 * @param organId
	 * @return
	 */
	@RequestMapping(value = "/selectStudentByOrganId", method = RequestMethod.POST)
	List<Student> selectStudentByOrganId(@RequestParam("organId")Long organId);

	/**
	 * 根据机构主键学生编号查找所有学生
	 * @param organId
	 * @return
	 */
	@RequestMapping(value = "/selectStudentByOrganIdStuNo", method = RequestMethod.POST)
	Student selectStudentByOrganIdStuNo(@RequestParam("organId")Long organId , @RequestParam("stuNo")String stuNo);

	/**
	 * 根据机构主键查找班型
	 * @param organId
	 * @return
	 */
	@RequestMapping(value = "/findBaseLevelByOrganId", method = RequestMethod.POST)
	List<BaseLevel> findBaseLevelByOrganId(@RequestParam("organId")Long organId);

}
